package com.superlc.ssm.modular.sys.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.superlc.ssm.modular.sys.model.SysRole;
import com.superlc.ssm.modular.sys.dao.SysRoleDao;
import com.superlc.ssm.modular.sys.service.SysRoleService;

@Service
public class SysRoleServiceImpl implements SysRoleService{

    @Resource
    private SysRoleDao sysRoleDao;

    @Override
    public int insert(SysRole sysRole){
        return sysRoleDao.insert(sysRole);
    }

    @Override
    public int insertSelective(SysRole sysRole){
        return sysRoleDao.insertSelective(sysRole);
    }

    @Override
    public int insertList(List<SysRole> sysRoles){
        return sysRoleDao.insertList(sysRoles);
    }

    @Override
    public int update(SysRole sysRole){
        return sysRoleDao.update(sysRole);
    }

    @Override
    public int addPermissionToRoleById(Integer permissionId, Integer roleId) {
        return sysRoleDao.addPermissionToRoleById(permissionId,roleId);
    }
}
